package com.ask.threadcase1;

/**
 * 继承Thread类以实现多线程
 */
public class ThreadDemo extends Thread {
    long minPrime;

    ThreadDemo(long minPrime) {
        this.minPrime = minPrime;
    }

    // 重写run方法
    @Override
    public void run() {
        System.out.println("线程" + getName() + "的run方法被启动！");
        for (int i = 0; i < 100; i++) {
            System.out.println(getName() + ": " + i);
        }
    }
}
